package com.skygrass.caesar.consumer.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.skygrass.caesar.consumer.feign.BookFeign;

@RestController()
public class FeignController
{
	private static final Logger log = LoggerFactory.getLogger(FeignController.class);
	@Autowired
	BookFeign bookFeign;

	@GetMapping("/feign")
	public String helloConsumer()
	{
		String ret = bookFeign.get(1L);
		log.info("-----------success:" + ret + "-----------");
		//		System.out.println("-----------success:" + ret + "-----------");
		return ret;
	}
}
